import request from '@/utils/request'

// 新增培训人员考核结果
export function addTrainingPersonnelScore (data) {
    return request({
        url: '/subject/addTrainingPersonnelScore',
        method: 'POST',
        data: data
    })
}

// 新增培训课程
export function addTrainingProject (data) {
    return request({
        url: '/subject/addTrainingProject',
        method: 'POST',
        data: data
    })
}

export function uploadPerson (data) {
    return request({
        url: '/subject/importTrainingProjectPersonnel',
        method: 'POST',
        data: data
    })
}



// 新增培训课程课目
export function addTrainingSubject (data) {
    return request({
        url: '/subject/addTrainingSubject',
        method: 'POST',
        data: data
    })
}

// 新增培训人员
export function addTrainingSubjectPersonnel (data) {
    return request({
        url: '/subject/addTrainingSubjectPersonnel',
        method: 'POST',
        data: data
    })
}

// 删除人员所有成绩
export function delPersonnelAllScore (personnelId) {
    return request({
        url: `/subject/delPersonnelAllScore/${personnelId}`,
        method: 'delete'
    })
}

// 删除课程
export function delProjectById (projectId) {
    return request({
        url: `/subject/delProjectById/${projectId}`,
        method: 'delete'
    })
}

// 项目列表
export function findProjectList (data) {
    return request({
        url: '/subject/findProjectList',
        method: 'POST',
        data: data
    })
}


// 项目参与人员列表
export function queryProjectPersonnelList (data) {
    return request({
        url: '/subject/queryProjectPersonnelList',
        method: 'POST',
        data: data
    })
}


// 查看课程详情
export function findTrainingProjectDetail (projectId) {
    return request({
        url: `/subject/findTrainingProjectDetail/${projectId}`,
        method: 'get',
        params: query
    })
}

// 培训课目成绩展示列表
export function findTrainingSubjectResult (data) {
    return request({
        url: '/subject/findTrainingSubjectResult',
        method: 'POST',
        data: data
    })
}

// 查看培训课程课目列表
export function queryTrainingSubjectList (data) {
    return request({
        url: '/subject/queryTrainingSubjectList',
        method: 'POST',
        data: data
    })
}


// 新增或编辑培训人员考核成绩
export function addOrUpdateTrainingPersonnelScore (data) {
    return request({
        url: '/subject/addOrUpdateTrainingPersonnelScore',
        method: 'POST',
        data: data
    })
}

// 查看培训课程课目详情
export function queryTrainingSubjectDetail (query) {
    return request({
        url: `/subject/queryTrainingSubjectList/${query}`,
        method: 'get',
        params: query
    })
}

// 删除课目
export function delSubjectById (subjectId) {
    return request({
        url: `/subject/delSubjectById/${subjectId}`,
        method: 'delete',
    })
}

// 编辑考核成绩
export function updateTrainingPersonnelScore (data) {
    return request({
        url: '/subject/updateTrainingPersonnelScore',
        method: 'POST',
        data: data
    })
}

// 编辑培训课程
export function updateTrainingProject (data) {
    return request({
        url: '/subject/updateTrainingProject',
        method: 'POST',
        data: data
    })
}

// 编辑培训课程课目
export function updateTrainingSubject (data) {
    return request({
        url: '/subject/updateTrainingSubject',
        method: 'POST',
        data: data
    })
}

// 删除课程培训人员
export function delTrainingSubjectPersonnel (data) {
    return request({
        url: '/subject/delTrainingSubjectPersonnel',
        method: 'POST',
        data: data
    })
}

// 新增课程培训人员
export function addTrainingProjectPersonnel (data) {
    return request({
        url: '/subject/addTrainingProjectPersonnel',
        method: 'POST',
        data: data
    })
}


// 成绩审核
export function approvalPersonnelScoreApproval (data) {
    return request({
        url: '/subject/approvalPersonnelScoreApproval',
        method: 'POST',
        data: data
    })
}



// c找自己参与的项目
export function findMyProjectList (data) {
    return request({
        url: '/subject/findMyProjectList',
        method: 'POST',
        data: data
    })
}



// 批量添加培训人员成绩
export function batchAddTrainingPersonnelScore (data) {
    return request({
        url: '/subject/batchAddTrainingPersonnelScore',
        method: 'POST',
        data: data
    })
}
//batchAddTrainingPersonnelScore


export function batchDelTrainingPersonnelScore (data) {
    return request({
        url: '/subject/batchDelTrainingPersonnelScore',
        method: 'POST',
        data: data
    })
}